Learn R Programming

gmp (version 0.4-10)

Bigq operators: Basic arithmetic operators for large rationals

Description

Addition, substraction, multiplication, division.

Usage

add.bigq(a, b)
sub.bigq(a, b=NULL)
mul.bigq(a, b)
div.bigq(a, b)
abs.bigq(x)

Arguments

a,b,x
bigq, integer or string from an integer
...
Additional parameters

Value

  • A bigq class representing the result of the arithmetic operation.

Details

Operators can be use directly when objects are of class bigq: a + b, a * b, etc.

References

http://mulcyber.toulouse.inra.fr/projects/gmp/

Examples

Run this code
# 1/3+1=4/3
as.bigq(1,3) + 1

Run the code above in your browser using DataLab